<template>
	<view class="container">
		<view class="title">欢迎使用AI助手</view>
		<view class="ai-chat-entry" @click="goToAiChat">
			<image class="ai-icon" src="/static/ai-icon.png"></image>
			<view class="entry-text">开始AI聊天</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				chatApiUrl: 'http://localhost:9223/ai/chat'
			}
		},
		methods: {
			goToAiChat() {
				// 跳转到聊天页面
				uni.navigateTo({
					url: '/pages/ai/chat'
				})
			}
		}
	}
</script>

<style>
.container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 50rpx 30rpx;
	height: 100vh;
}

.title {
	font-size: 40rpx;
	font-weight: bold;
	margin-bottom: 60rpx;
}

.ai-chat-entry {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 80%;
	height: 100rpx;
	background: linear-gradient(45deg, #3b88fd, #3676db);
	border-radius: 50rpx;
	box-shadow: 0 10rpx 20rpx rgba(59, 136, 253, 0.3);
	padding: 20rpx;
	transition: transform 0.3s;
}

.ai-chat-entry:active {
	transform: scale(0.98);
}

.ai-icon {
	width: 60rpx;
	height: 60rpx;
	margin-right: 20rpx;
}

.entry-text {
	color: #ffffff;
	font-size: 34rpx;
	font-weight: 500;
}
</style>
